package cs271.examples.binarytrees;
/**
 * Modificatiton of the code at:
 * http://www.mhhe.com/engcs/compsci/collins/source_code/ch10/BinarySearchTreeMain/
 *
 * @param <E>
 */
public class BinaryTreeElement {
	protected Object element;

	private BinaryTreeElement left = null,
	right = null,
	parent;

	/**
	 *  Initializes this Entry object.
	 *
	 *  This default constructor is defined for the sake of subclasses of
	 *  the BinarySearchTree class.	
	 */
	public BinaryTreeElement() { }


	/**
	 *  Initializes this Entry object from element and parent.
	 *
	 */	
	public BinaryTreeElement (Object element, BinaryTreeElement parent)  {
		this.element = element;
		this.parent = parent;
	}


	public BinaryTreeElement getLeft() {
		return left;
	}


	public void setLeft(BinaryTreeElement left) {
		this.left = left;
	}


	public BinaryTreeElement getParent() {
		return parent;
	}


	public void setParent(BinaryTreeElement parent) {
		this.parent = parent;
	}


	public BinaryTreeElement getRight() {
		return right;
	}
	
	public void setRight(BinaryTreeElement right) {
		this.right = right;
	}


	public Object getElement() {
		return element;
	} 
}
